package cn.jksoft.businessclient.api;

import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Author:  nick
 * Email:   nickdevp@gmail.com
 * Date:    16/4/7 16:04.
 * Description:
 */
public class ReceivingService {

//    public static final String BASE_URL = "http://120.25.224.27:21080/chekoo/AppRest/";// 新测试环境
    public static final String BASE_URL = "http://www.51chegj.com/chekoo/AppRest/";//生产环境

    static OkHttpClient client = new OkHttpClient();
    private static Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(BASE_URL)
            .client(client)
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
            .build();

    private ReceivingService() {

    }

    public static ReceivingApi createReceivingService() {
        return retrofit.create(ReceivingApi.class);
    }

}
